//
//(C) Copyright 2011 HongKong Airline.,Ltd. 
//
/**
 * messageUserServiceImpl
 * 项目名称:代购系统
 *
 * @author Mengxiangliang
 *
 * 功能描述:
 * 
 * 历史版本:2013-01-04 v1.0.0 Mengxiangliang  创建:
 * 
 */
 
package com.gamutsoft.amb.messageuser.service.impl;

import java.util.List;
import java.util.Map;

import com.gamutsoft.amb.common.bean.QueryExample;
import com.gamutsoft.amb.common.exception.BusinessException;
import com.gamutsoft.amb.common.service.impl.GenericServiceImpl;
import com.gamutsoft.amb.messageuser.dao.IMessageUserDao;
import com.gamutsoft.amb.messageuser.model.MessageUser;
import com.gamutsoft.amb.messageuser.service.IMessageUserService;

public class MessageUserServiceImpl extends GenericServiceImpl<MessageUser, Long> implements IMessageUserService {
	public IMessageUserDao messageUserDao;

    public MessageUserServiceImpl(IMessageUserDao messageUserDao) {
		super(messageUserDao);
		this.messageUserDao = messageUserDao;
	}
	
	/**
	 * 根据条件查询记录
	 * @author Mengxiangliang
	 * @param  QueryExample
	 * @return MessageUserList
	 * @throws BusinessException
	 */
	public List<Map> searchMessageUserList(QueryExample qe) throws BusinessException{
	  
	   return messageUserDao.searchMessageUserList(qe);
	   
	}
	
	/**
	 * 根据ID查询记录
	 * @author Mengxiangliang
	 * @param Long id
	 * @return domain
	 * @throws BusinessException
	 */
	public MessageUser searchMessageUserById(Long id) throws BusinessException{
	  
	   return messageUserDao.searchMessageUserById(id);
	   
	}

	/**
	 *  删除记录
	 * @author Mengxiangliang	 
	 * @param id
	 * @throws BusinessException
	 */
	public void deleteMessageUserById(Long id) throws BusinessException{
	 
	  messageUserDao.deleteMessageUserById(id);
	  
	}
	
	/**
	 * 修改记录
	 * @author Mengxiangliang
	 * @param domain
	 * @throws BusinessException
	 */
	public void updateMessageUser(MessageUser domain) throws BusinessException{
	
	   messageUserDao.save(domain);
	   
	}

	/**
	 * 新增记录
	 * @author Mengxiangliang
	 * @param domain
	 * @return
	 * @throws BusinessException
	 */
	public void createMessageUser(MessageUser domain) throws BusinessException{
	
	   messageUserDao.save(domain);
	}
	

}